var user = {
	id : localStorage.getItem("userId"),
	info : JSON.parse( localStorage.getItem("userInfo") ),
	babyInfo : JSON.parse( localStorage.getItem("babyInfo") ),
	mainbaby_info : JSON.parse( localStorage.getItem("mainbaby_info") ),
	mainbaby_growth : JSON.parse( localStorage.getItem("mainbaby_growth") ),
};

var profileInfo = {
	babyId : user.mainbaby_info.babyid,
	babyNick : user.mainbaby_info.nick,
	babyInfo : user.mainbaby_info,
	growth : user.mainbaby_growth,
	
	init : function(){
		this.babyId = user.mainbaby_info.babyid;
		this.babyNick = user.mainbaby_info.nick;
		this.babyInfo = user.mainbaby_info;
		this.growth = user.mainbaby_growth;
	}
};

var postInfo = {
	startIndex : 0,
	visitFriend : false,
	babyId : user.mainbaby_info.babyid,
	babyNick : user.mainbaby_info.nick,
	pf_name : user.mainbaby_info.pf_name,
	selectedPostId : -1,
	selectedPostUserId : -1,

	init : function(){
		this.startIndex = 0;
		this.visitFriend = false;
		this.babyId = user.mainbaby_info.babyid;
		this.babyNick = user.mainbaby_info.nick;
		this.pf_name = user.mainbaby_info.pf_name;
		this.selectedPostId = -1;
		this.selectedPostUserId = -1;
	}
};

var snsPostInfo = {
	startIndex : 0,
	selectedPostId : -1,
	selectedPostUserId : -1,
	
	init : function(){
		this.startIndex = 0;
		this.selectedPostId = -1;
		this.selectedPostUserId = -1;
	}
};

var diaryInfo = {
	dateTime : "0",
	typeId : "0",
	title : "0",
	contents : "0",
	permission : "1",
	startTime : "0",
	endTime : "0",
	amount : "0",

	setValues : function( dateTime, typeId, title, contents, permission, startTime, endTime, amount ){
		if( dateTime != null )
			this.dateTime = dateTime;
		if( typeId != null )
			this.typeId = typeId;
		if( title != null )
			this.title = title;
		if( contents != null )
			this.contents = contents;
		if( permission != null )
			this.permission = permission;
		if( startTime != null )
			this.startTime = startTime;
		if( endTime != null )
			this.endTime = endTime;
		if( amount != null )
			this.amount = amount;
	}
};

var messageInfo = {
	babyId : 0,
	select : false,
};

var modifyInfo = {
	modify : false,
}

var nowURL;